home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu168a.dms / pu168a.adf / Scripts / tutorial9.art < prev   
Text File  |  1991-11-11  |  2KB  |  109 lines

  1. !---------------------------------------------------------------
  2. !
  3. ! TUTORIAL9 - RayDance tutorial script #9.
  4. !
  5. ! This script demonstrates the extrude statement.
  6. !
  7. ! Concepts include :
  8. !
  9. !  o Creating a solid extrusions.
  10. !
  11. !  o Using the BEVEL extrusion flag.
  12. !
  13. !  o Algorithmic outline creation
  14. !
  15. !---------------------------------------------------------------
  16.  
  17. ! Use a print statement to display descriptive text on the
  18. ! message window.
  19.  
  20.  
  21. ? "TUTORIAL9 - This script creates 3 boxes using the extrude\n",
  22.   "statement.  The blue box has no top or bottom.  The green\n",
  23.   "box has both top and bottom.  The brown box has beveled\n",
  24.   "edges around the top and bottom.\n";
  25.  
  26.  
  27. ! Variables
  28.  
  29. integer  SEGMENTS = 64;     ! # of steps around lathed objects
  30. vector   SCALING = [1,1,1]; ! Full size
  31.  
  32.  
  33.  
  34. ! Create colors for our objects
  35.  
  36. BLUE   : color(RGB, [0,0,.7] );
  37. GREEN  : color(RGB, [.1,.6,0] );
  38. ORANGE : color(RGB, [.6,.3,0] );
  39.  
  40. ! Make up a surface for our objects
  41.  
  42. !                       ka kd ks  n km kr ir kb flgs
  43. MATTE  : surface(PHONG, .5,.8, 0, 0, 0, 0, 0, 0, 0 );
  44. SHINY  : surface(PHONG, .5,.8,.4,30, 0, 0, 0, 0, 0 );
  45.  
  46.  
  47. ! Create the outlines we're going to extrude.
  48.  
  49.  
  50. ! The outline for our boxes
  51.  
  52. BOX_OUTLINE : outline[4] = (
  53.   [-100,-100,0], [-100,100,0], [100,100,0], [100,-100,0]
  54. );
  55.  
  56. !  EXTRUDE( <corner list>, <extrude len>, <extrude dir>, <scale>,
  57. !    <position>, <rot angles>, <color>, <surf>, <flags> );
  58.  
  59. ! Create "box" extrusion with out ends.
  60.  
  61. extrude( ( BOX_OUTLINE ),
  62.   200, [0,0,1], [1,1,1], [-350,0,0], [0,0,60],
  63.   BLUE, MATTE, NOENDS );
  64.  
  65.  
  66. ! Create "box" extrusion with ends.
  67.  
  68. extrude( ( BOX_OUTLINE ),
  69.   200, [0,0,1], [1,1,1], [0,0,0], [0,0,45],
  70.   GREEN, MATTE, 0 );
  71.  
  72.  
  73. ! Create "box" extrusion with beveled ends
  74.  
  75. extrude( ( BOX_OUTLINE ),
  76.   200, [0,0,1], [1,1,1], [350,0,0], [0,0,30],
  77.   ORANGE, SHINY, BEVEL PHONG );
  78.  
  79.  
  80. ! Specify the ambient light.
  81.  
  82. AMBIENT( [0,0,0], [0.6,0.6,0.6], [0,0,1], 0, 0 );
  83.  
  84. ! Specify the STAR light.
  85.  
  86. STAR( [40000,-50000,60000], [1,.9,1], 300 );
  87.  
  88.  
  89. ! Set the background color to a dark purple
  90.  
  91. BACKGROUND( PLAIN, [0,0.05,0.15] );
  92.  
  93.  
  94. ! The camera will be positioned along the negative y axis aiming
  95. ! toward the central objects
  96.  
  97. CAMERA'POS = [0,-1300,800];
  98. CAMERA'TARGET = [0,0,100];
  99.  
  100.  
  101. ! The scene has now been constructed, render it!
  102.  
  103. RENDER;
  104.  
  105.  
  106. ! All scripts must terminate with an END
  107.  
  108. END
  109.